<script>
	import websocket from './common/websocket.js'
	
	export default {
		onLaunch: function() {
			console.log('App Launch')
			// 应用启动时检查是否有用户登录信息，如果有则初始化WebSocket连接
			const userInfo = uni.getStorageSync('userInfo')
			if (userInfo && userInfo.phone) {
				websocket.init(userInfo.phone)
			}
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
</style>